package com.anlu.base.jdk.jdk8;

import com.anlu.base.jdk.jdk8.functions.ExecuteBusiness;
import com.anlu.base.jdk.jdk8.functions.SalaryCalculator;

import java.util.Arrays;
import java.util.List;
import java.util.StringJoiner;

/**
 * <p>
 * Description:TODO 详细描述
 * <p>
 * <p>
 *
 * @author anlu
 * @date 2024/9/24 14:18
 */
public class UseExecuteBusiness {

    public static void main(String[] args) {
        List<String> data = Arrays.asList("张无忌","张翠山","张三丰","小昭","赵敏","白眉鹰王");

        //使用自定义函数接口
        ExecuteBusiness eb = () -> {

            StringJoiner sj = new StringJoiner(",");
            for (String s : data){
                sj.add(s);
            }
            System.out.println("武侠人物：" + sj.toString());

        };

        eb.execute();

    }
}
